package demo.practice.leetcode_eveyday;

import java.util.Arrays;

public class P455 {


    public int findContentChildren(int[] g, int[] s) {

        Arrays.sort(g);
        Arrays.sort(s);

        int sum=0;
        int i=0;int j=0;
        while(i<g.length&& j<s.length){
            if(s[j]>=g[i]){
                sum++;
                i++;
            }
            j++;
        }

        return sum;
    }
}
